package com.itheima.d5_map_traverse;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class MapTest1 {
    public static void main(String[] args) {
     //准备一个map集合
        Map<String,Double> map =new HashMap<>();
        map.put("a",100.1);
        map.put("a",110.2);
        map.put("b",200.3);
        map.put("c",300.5);
        map.put("d",400.2);
        System.out.println(map);

        Set<String> keys = map.keySet();

        for (String key : keys) {
            double value = map.get(key);
            System.out.println(key + "===" + value);
        }
    }
}
